home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1993 / Internet Info CD-ROM (Walnut Creek) (1993).iso / networking / mail / uucp / uubatch.105 / uucdebat < prev    next >
Encoding:
Text File  |  1993-06-08  |  1.7 KB  |  71 lines

  1. #!/bin/sh
  2. #
  3. # uucdebat, uubatch version 1.0.5
  4. #
  5. # The command that should be executed is : "uncompress | uudebat".
  6. # It is best to use absolute file name and paths here, since it is
  7. # critical not to miss...
  8. #
  9. # Some check was addedd for those who install before they read the
  10. # instructions. In that case, having some critical files in
  11. # other-then-expected pathneme may cause uucdebat to silently eat all
  12. # incomming mail, unless these checks are mnade.
  13. #
  14. # If you do read this, you may want to take out those checks, after verifying
  15. # teh filenames. The only line that is neccsary from uucdabat functional
  16. # point of view is:
  17. #
  18. #     /usr/ucb/uncompress | /usr/bin/uudebat
  19. #
  20. UNCOMP=/usr/ucb/uncompress
  21. UNZIP=/usr/local/bin/unzip
  22. UUDEBAT=/usr/bin/uudebat
  23. FCAT=/usr/local/bin/fcat
  24.  
  25. #
  26. # This is the user error is mailed to.
  27. #
  28. USER=uucp
  29.  
  30. report_error () { \
  31.     ( \
  32.     echo "uucdebat : Incorrect configuration. Mail may have been lost.";
  33.     echo "           please check some pathnemss:" ;
  34.     echo "           specificaly, there is no compressor at $1";
  35.     echo "           or no uudebat at $UUDEBAT";
  36.     ) \
  37.     | mail -s "uucdebat configuration error" $USER
  38. };
  39.  
  40. case $1 in
  41. unzip|zip|-unzip|-zip)
  42.     if test -x $UNZIP -a -x $UUDEBAT ;
  43.     then
  44.         $UNZIP -p | $UUDEBAT
  45.     else
  46.         report_error $UNZIP;
  47.     fi;;
  48.  
  49. freeze|melt|-freeze|-melt)
  50.     if test -x $FCAT -a -x $UUDEBAT ;
  51.     then
  52.         $FCAT -p | $UUDEBAT
  53.     else
  54.         report_error $FCAT;
  55.     fi;;
  56.  
  57. uncompress|compress|-uncompress|-compress|"")
  58.     if test -x $UNCOMP -a -x $UUDEBAT ;
  59.     then
  60.          $UNCOMP -c | $UUDEBAT
  61.     else
  62.         report_error $UNCOMP;
  63.     fi;;
  64.  
  65. *)
  66.     ( \
  67.     echo "uucdebat : Unknown compression scheme ($1). Mail may have been lost";
  68.     ) \
  69.     | mail -s "uucdebat configuration error" $USER
  70. esac
  71.